// import { getToken } from '@/utils/auth'
import request from '@/utils/request'

export function getCustomer(params) { // 查询数据
  return request({
    url: '/product/customer/getCustomer',
    method: 'post',
    params
  })
}

export function postUpData(data) { // 修改数据
  return request({
    url: '/product/customer/postUpData',
    method: 'post',
    data: {
      id: parseInt(data.id),
      name: data.name,
      phoneId: parseInt(data.phoneId),
      sex: parseInt(data.sex)
    }
  })
}

export function insertCustomer(data) { // 插入数据
  return request({
    url: '/product/customer/insertCustomer',
    method: 'post',
    data
  })
}

export function delectCustomer(params) { // 删除
  return request({
    url: '/product/customer/delectCustomer',
    method: 'get',
    params
  })
}

export function query(params) { // 查询
  return request({
    url: '/product/customer/query',
    method: 'post',
    params
  })
}
